<template>
  <view class="init"></view>
</template>
<script>
export default {
  onLoad() {
    const value = uni.getStorageSync("launchFlag");
    if (value) {
      uni.switchTab({
        url: "/pages/common/home/index"
      });
    } else {
      uni.setStorage({
        key: "launchFlag",
        data: true
      });
      uni.redirectTo({
        url: "/pages/common/guide"
      });
    }
  }
};
</script>
